package com.dminvoicemanager.itemmaster;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.dminvoicemanager.R;
import com.dminvoicemanager.tabs.DM_Merchandising_Information;
import com.dminvoicemanager.tabs.DM_RetOutstanding_Information;
import com.dminvoicemanager.tabs.DM_Retailer_Information;

public class DM_ItemsMaster_Main_Tabs extends TabActivity {
	
	public void btnBack(View view) {
		Intent myIntent = new Intent(view.getContext(),
				DM_Item_Master.class);
		myIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
				| Intent.FLAG_ACTIVITY_NEW_TASK);
		startActivityForResult(myIntent, 0);
		finish();
	}
	private static final String TAG = null;
	String TagIdRetailer;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dm_retailer_info_maintabs);
	
		TabHost tabHost = getTabHost();

		// Tab for Display accounts
		TabSpec retInfo = tabHost.newTabSpec("Items Info");
		retInfo.setIndicator("Items Info", getResources()
				.getDrawable(R.drawable.exit));
		Intent photosIntent = new Intent(this, DM_Items_Information.class);
		retInfo.setContent(photosIntent);

		// Tab for add new account
		TabSpec merchInfo = tabHost.newTabSpec("Items Price");
		// setting Title and Icon for the Tab
		merchInfo.setIndicator("Items Price",
				getResources().getDrawable(R.drawable.exit));
		Intent songsIntent = new Intent(this,
				DM_Items_Prices_Information.class);
		merchInfo.setContent(songsIntent);

		// Tab for display accounts reports
		TabSpec retoutInfo = tabHost.newTabSpec("Stock Info");
		retoutInfo.setIndicator("Stock Info",
				getResources().getDrawable(R.drawable.exit));
		Intent videosIntent = new Intent(this,
				DM_Items_Stocks_Information.class);
		retoutInfo.setContent(videosIntent);

		// Adding all TabSpec to TabHost
		tabHost.addTab(retInfo); // Display Retailer Information tab
		tabHost.addTab(merchInfo); // Display Merchandising Information tab
		tabHost.addTab(retoutInfo); // Display Outstanding Information tab
	}
	@Override
	public void onBackPressed() {
		// Do Here what ever you want do on back press;
	}
}